package com.urbansquall.ui
{
	import flash.display.*;

	public class TriangleImg extends Sprite
	{
		public function TriangleImg( a_rotation:Number, a_width:Number, a_height:Number, a_color:uint=0x000000 )
		{
			var tri:Shape = new Shape();
			tri.graphics.beginFill( a_color );
			tri.graphics.lineStyle( 2, 0xFFFFFF );
			tri.graphics.moveTo( -(a_width/2), -(a_height/2) );
			tri.graphics.lineTo( a_width/2, 0 );
			tri.graphics.lineTo( -(a_width/2), a_height/2 );
			tri.graphics.lineTo( -(a_width/2), -(a_height/2) );
			
			tri.rotation = a_rotation;
			addChild( tri );
			tri.x = a_width/2;
			tri.y = a_height/2;
		}
	}
}